package com.fc.v2.model.auto;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import cn.hutool.core.util.StrUtil;

/**
 * 课程表 CourseExample
 * @author fuce_自动生成
 * @date 2021-06-10 16:17:56
 */
public class CourseExample {

    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public CourseExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }
        
				
        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLike(Integer value) {
            addCriterion("id like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotLike(Integer value) {
            addCriterion("id not like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }
        
				
        public Criteria andTitleIsNull() {
            addCriterion("title is null");
            return (Criteria) this;
        }

        public Criteria andTitleIsNotNull() {
            addCriterion("title is not null");
            return (Criteria) this;
        }

        public Criteria andTitleEqualTo(String value) {
            addCriterion("title =", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotEqualTo(String value) {
            addCriterion("title <>", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleGreaterThan(String value) {
            addCriterion("title >", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleGreaterThanOrEqualTo(String value) {
            addCriterion("title >=", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLessThan(String value) {
            addCriterion("title <", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLessThanOrEqualTo(String value) {
            addCriterion("title <=", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLike(String value) {
            addCriterion("title like", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotLike(String value) {
            addCriterion("title not like", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleIn(List<String> values) {
            addCriterion("title in", values, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotIn(List<String> values) {
            addCriterion("title not in", values, "title");
            return (Criteria) this;
        }

        public Criteria andTitleBetween(String value1, String value2) {
            addCriterion("title between", value1, value2, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotBetween(String value1, String value2) {
            addCriterion("title not between", value1, value2, "title");
            return (Criteria) this;
        }
        
				
        public Criteria andCoverIsNull() {
            addCriterion("cover is null");
            return (Criteria) this;
        }

        public Criteria andCoverIsNotNull() {
            addCriterion("cover is not null");
            return (Criteria) this;
        }

        public Criteria andCoverEqualTo(String value) {
            addCriterion("cover =", value, "cover");
            return (Criteria) this;
        }

        public Criteria andCoverNotEqualTo(String value) {
            addCriterion("cover <>", value, "cover");
            return (Criteria) this;
        }

        public Criteria andCoverGreaterThan(String value) {
            addCriterion("cover >", value, "cover");
            return (Criteria) this;
        }

        public Criteria andCoverGreaterThanOrEqualTo(String value) {
            addCriterion("cover >=", value, "cover");
            return (Criteria) this;
        }

        public Criteria andCoverLessThan(String value) {
            addCriterion("cover <", value, "cover");
            return (Criteria) this;
        }

        public Criteria andCoverLessThanOrEqualTo(String value) {
            addCriterion("cover <=", value, "cover");
            return (Criteria) this;
        }

        public Criteria andCoverLike(String value) {
            addCriterion("cover like", value, "cover");
            return (Criteria) this;
        }

        public Criteria andCoverNotLike(String value) {
            addCriterion("cover not like", value, "cover");
            return (Criteria) this;
        }

        public Criteria andCoverIn(List<String> values) {
            addCriterion("cover in", values, "cover");
            return (Criteria) this;
        }

        public Criteria andCoverNotIn(List<String> values) {
            addCriterion("cover not in", values, "cover");
            return (Criteria) this;
        }

        public Criteria andCoverBetween(String value1, String value2) {
            addCriterion("cover between", value1, value2, "cover");
            return (Criteria) this;
        }

        public Criteria andCoverNotBetween(String value1, String value2) {
            addCriterion("cover not between", value1, value2, "cover");
            return (Criteria) this;
        }
        
				
        public Criteria andPriceIsNull() {
            addCriterion("price is null");
            return (Criteria) this;
        }

        public Criteria andPriceIsNotNull() {
            addCriterion("price is not null");
            return (Criteria) this;
        }

        public Criteria andPriceEqualTo(BigDecimal value) {
            addCriterion("price =", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotEqualTo(BigDecimal value) {
            addCriterion("price <>", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceGreaterThan(BigDecimal value) {
            addCriterion("price >", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("price >=", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceLessThan(BigDecimal value) {
            addCriterion("price <", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("price <=", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceLike(BigDecimal value) {
            addCriterion("price like", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotLike(BigDecimal value) {
            addCriterion("price not like", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceIn(List<BigDecimal> values) {
            addCriterion("price in", values, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotIn(List<BigDecimal> values) {
            addCriterion("price not in", values, "price");
            return (Criteria) this;
        }

        public Criteria andPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("price between", value1, value2, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("price not between", value1, value2, "price");
            return (Criteria) this;
        }
        
				
        public Criteria andCHoursIsNull() {
            addCriterion("c_hours is null");
            return (Criteria) this;
        }

        public Criteria andCHoursIsNotNull() {
            addCriterion("c_hours is not null");
            return (Criteria) this;
        }

        public Criteria andCHoursEqualTo(Integer value) {
            addCriterion("c_hours =", value, "cHours");
            return (Criteria) this;
        }

        public Criteria andCHoursNotEqualTo(Integer value) {
            addCriterion("c_hours <>", value, "cHours");
            return (Criteria) this;
        }

        public Criteria andCHoursGreaterThan(Integer value) {
            addCriterion("c_hours >", value, "cHours");
            return (Criteria) this;
        }

        public Criteria andCHoursGreaterThanOrEqualTo(Integer value) {
            addCriterion("c_hours >=", value, "cHours");
            return (Criteria) this;
        }

        public Criteria andCHoursLessThan(Integer value) {
            addCriterion("c_hours <", value, "cHours");
            return (Criteria) this;
        }

        public Criteria andCHoursLessThanOrEqualTo(Integer value) {
            addCriterion("c_hours <=", value, "cHours");
            return (Criteria) this;
        }

        public Criteria andCHoursLike(Integer value) {
            addCriterion("c_hours like", value, "cHours");
            return (Criteria) this;
        }

        public Criteria andCHoursNotLike(Integer value) {
            addCriterion("c_hours not like", value, "cHours");
            return (Criteria) this;
        }

        public Criteria andCHoursIn(List<Integer> values) {
            addCriterion("c_hours in", values, "cHours");
            return (Criteria) this;
        }

        public Criteria andCHoursNotIn(List<Integer> values) {
            addCriterion("c_hours not in", values, "cHours");
            return (Criteria) this;
        }

        public Criteria andCHoursBetween(Integer value1, Integer value2) {
            addCriterion("c_hours between", value1, value2, "cHours");
            return (Criteria) this;
        }

        public Criteria andCHoursNotBetween(Integer value1, Integer value2) {
            addCriterion("c_hours not between", value1, value2, "cHours");
            return (Criteria) this;
        }
        
				
        public Criteria andTypeIdIsNull() {
            addCriterion("type_id is null");
            return (Criteria) this;
        }

        public Criteria andTypeIdIsNotNull() {
            addCriterion("type_id is not null");
            return (Criteria) this;
        }

        public Criteria andTypeIdEqualTo(Integer value) {
            addCriterion("type_id =", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotEqualTo(Integer value) {
            addCriterion("type_id <>", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdGreaterThan(Integer value) {
            addCriterion("type_id >", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("type_id >=", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdLessThan(Integer value) {
            addCriterion("type_id <", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdLessThanOrEqualTo(Integer value) {
            addCriterion("type_id <=", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdLike(Integer value) {
            addCriterion("type_id like", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotLike(Integer value) {
            addCriterion("type_id not like", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdIn(List<Integer> values) {
            addCriterion("type_id in", values, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotIn(List<Integer> values) {
            addCriterion("type_id not in", values, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdBetween(Integer value1, Integer value2) {
            addCriterion("type_id between", value1, value2, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotBetween(Integer value1, Integer value2) {
            addCriterion("type_id not between", value1, value2, "typeId");
            return (Criteria) this;
        }
        
				
        public Criteria andMechanismIdIsNull() {
            addCriterion("mechanism_id is null");
            return (Criteria) this;
        }

        public Criteria andMechanismIdIsNotNull() {
            addCriterion("mechanism_id is not null");
            return (Criteria) this;
        }

        public Criteria andMechanismIdEqualTo(Integer value) {
            addCriterion("mechanism_id =", value, "mechanismId");
            return (Criteria) this;
        }

        public Criteria andMechanismIdNotEqualTo(Integer value) {
            addCriterion("mechanism_id <>", value, "mechanismId");
            return (Criteria) this;
        }

        public Criteria andMechanismIdGreaterThan(Integer value) {
            addCriterion("mechanism_id >", value, "mechanismId");
            return (Criteria) this;
        }

        public Criteria andMechanismIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("mechanism_id >=", value, "mechanismId");
            return (Criteria) this;
        }

        public Criteria andMechanismIdLessThan(Integer value) {
            addCriterion("mechanism_id <", value, "mechanismId");
            return (Criteria) this;
        }

        public Criteria andMechanismIdLessThanOrEqualTo(Integer value) {
            addCriterion("mechanism_id <=", value, "mechanismId");
            return (Criteria) this;
        }

        public Criteria andMechanismIdLike(Integer value) {
            addCriterion("mechanism_id like", value, "mechanismId");
            return (Criteria) this;
        }

        public Criteria andMechanismIdNotLike(Integer value) {
            addCriterion("mechanism_id not like", value, "mechanismId");
            return (Criteria) this;
        }

        public Criteria andMechanismIdIn(List<Integer> values) {
            addCriterion("mechanism_id in", values, "mechanismId");
            return (Criteria) this;
        }

        public Criteria andMechanismIdNotIn(List<Integer> values) {
            addCriterion("mechanism_id not in", values, "mechanismId");
            return (Criteria) this;
        }

        public Criteria andMechanismIdBetween(Integer value1, Integer value2) {
            addCriterion("mechanism_id between", value1, value2, "mechanismId");
            return (Criteria) this;
        }

        public Criteria andMechanismIdNotBetween(Integer value1, Integer value2) {
            addCriterion("mechanism_id not between", value1, value2, "mechanismId");
            return (Criteria) this;
        }
        
				
        public Criteria andPopularIsNull() {
            addCriterion("popular is null");
            return (Criteria) this;
        }

        public Criteria andPopularIsNotNull() {
            addCriterion("popular is not null");
            return (Criteria) this;
        }

        public Criteria andPopularEqualTo(Integer value) {
            addCriterion("popular =", value, "popular");
            return (Criteria) this;
        }

        public Criteria andPopularNotEqualTo(Integer value) {
            addCriterion("popular <>", value, "popular");
            return (Criteria) this;
        }

        public Criteria andPopularGreaterThan(Integer value) {
            addCriterion("popular >", value, "popular");
            return (Criteria) this;
        }

        public Criteria andPopularGreaterThanOrEqualTo(Integer value) {
            addCriterion("popular >=", value, "popular");
            return (Criteria) this;
        }

        public Criteria andPopularLessThan(Integer value) {
            addCriterion("popular <", value, "popular");
            return (Criteria) this;
        }

        public Criteria andPopularLessThanOrEqualTo(Integer value) {
            addCriterion("popular <=", value, "popular");
            return (Criteria) this;
        }

        public Criteria andPopularLike(Integer value) {
            addCriterion("popular like", value, "popular");
            return (Criteria) this;
        }

        public Criteria andPopularNotLike(Integer value) {
            addCriterion("popular not like", value, "popular");
            return (Criteria) this;
        }

        public Criteria andPopularIn(List<Integer> values) {
            addCriterion("popular in", values, "popular");
            return (Criteria) this;
        }

        public Criteria andPopularNotIn(List<Integer> values) {
            addCriterion("popular not in", values, "popular");
            return (Criteria) this;
        }

        public Criteria andPopularBetween(Integer value1, Integer value2) {
            addCriterion("popular between", value1, value2, "popular");
            return (Criteria) this;
        }

        public Criteria andPopularNotBetween(Integer value1, Integer value2) {
            addCriterion("popular not between", value1, value2, "popular");
            return (Criteria) this;
        }
        
				
        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLike(Integer value) {
            addCriterion("status like", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotLike(Integer value) {
            addCriterion("status not like", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }
        
			
		 public Criteria andLikeQuery(Course record) {
		 	List<String> list= new ArrayList<String>();
		 	List<String> list2= new ArrayList<String>();
        	StringBuffer buffer=new StringBuffer();
			if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) {
    			 list.add("ifnull(id,'')");
    		}
			if(record.getTitle()!=null&&StrUtil.isNotEmpty(record.getTitle().toString())) {
    			 list.add("ifnull(title,'')");
    		}
			if(record.getCover()!=null&&StrUtil.isNotEmpty(record.getCover().toString())) {
    			 list.add("ifnull(cover,'')");
    		}
			if(record.getPrice()!=null&&StrUtil.isNotEmpty(record.getPrice().toString())) {
    			 list.add("ifnull(price,'')");
    		}
			if(record.getCHours()!=null&&StrUtil.isNotEmpty(record.getCHours().toString())) {
    			 list.add("ifnull(c_hours,'')");
    		}
			if(record.getTypeId()!=null&&StrUtil.isNotEmpty(record.getTypeId().toString())) {
    			 list.add("ifnull(type_id,'')");
    		}
			if(record.getMechanismId()!=null&&StrUtil.isNotEmpty(record.getMechanismId().toString())) {
    			 list.add("ifnull(mechanism_id,'')");
    		}
			if(record.getPopular()!=null&&StrUtil.isNotEmpty(record.getPopular().toString())) {
    			 list.add("ifnull(popular,'')");
    		}
			if(record.getStatus()!=null&&StrUtil.isNotEmpty(record.getStatus().toString())) {
    			 list.add("ifnull(status,'')");
    		}
			if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) {
    			list2.add("'%"+record.getId()+"%'");
    		}
			if(record.getTitle()!=null&&StrUtil.isNotEmpty(record.getTitle().toString())) {
    			list2.add("'%"+record.getTitle()+"%'");
    		}
			if(record.getCover()!=null&&StrUtil.isNotEmpty(record.getCover().toString())) {
    			list2.add("'%"+record.getCover()+"%'");
    		}
			if(record.getPrice()!=null&&StrUtil.isNotEmpty(record.getPrice().toString())) {
    			list2.add("'%"+record.getPrice()+"%'");
    		}
			if(record.getCHours()!=null&&StrUtil.isNotEmpty(record.getCHours().toString())) {
    			list2.add("'%"+record.getCHours()+"%'");
    		}
			if(record.getTypeId()!=null&&StrUtil.isNotEmpty(record.getTypeId().toString())) {
    			list2.add("'%"+record.getTypeId()+"%'");
    		}
			if(record.getMechanismId()!=null&&StrUtil.isNotEmpty(record.getMechanismId().toString())) {
    			list2.add("'%"+record.getMechanismId()+"%'");
    		}
			if(record.getPopular()!=null&&StrUtil.isNotEmpty(record.getPopular().toString())) {
    			list2.add("'%"+record.getPopular()+"%'");
    		}
			if(record.getStatus()!=null&&StrUtil.isNotEmpty(record.getStatus().toString())) {
    			list2.add("'%"+record.getStatus()+"%'");
    		}
        	buffer.append(" CONCAT(");
	        buffer.append(StrUtil.join(",",list));
        	buffer.append(")");
        	buffer.append(" like CONCAT(");
        	buffer.append(StrUtil.join(",",list2));
        	buffer.append(")");
        	if(!" CONCAT() like CONCAT()".equals(buffer.toString())) {
        		addCriterion(buffer.toString());
        	}
        	return (Criteria) this;
        }
        
        public Criteria andLikeQuery2(String searchText) {
		 	List<String> list= new ArrayList<String>();
        	StringBuffer buffer=new StringBuffer();
    		list.add("ifnull(id,'')");
    		list.add("ifnull(title,'')");
    		list.add("ifnull(cover,'')");
    		list.add("ifnull(price,'')");
    		list.add("ifnull(c_hours,'')");
    		list.add("ifnull(type_id,'')");
    		list.add("ifnull(mechanism_id,'')");
    		list.add("ifnull(popular,'')");
    		list.add("ifnull(status,'')");
        	buffer.append(" CONCAT(");
	        buffer.append(StrUtil.join(",",list));
        	buffer.append(")");
        	buffer.append("like '%");
        	buffer.append(searchText);
        	buffer.append("%'");
        	addCriterion(buffer.toString());
        	return (Criteria) this;
        }
        
}
	
    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}